package red.book._3._2;

import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.net.URLEncoder;

public class Test {
	public static void main(String[] args) throws URISyntaxException {
		String str = "wo  s";
		str= str.replaceAll(" ", "%20");
		System.out.println(str);
		URI ur = new URI("http://point.cxg.changyou.com/api/addCode.action?roleId=6646704&roleName="+ str+"&code=1");
		System.out.println(ur);
	}
}
